package cmd

import (
	"github.com/spf13/cobra"
)

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
	Use:   "st",
	Short: "A command line tool for encrypting, decrypting, and encoding strings or files",
	Long: `A command line tool for encrypting, decrypting, and encoding strings or files
	Currently supported encoding methods：Base64、Hex、Unicode
	Currently supported hash algorithms：MD5、sha256
	Currently supported encryption and decryption algorithms：AES`,
}

var (
	InputFile   string
	OutputFile  string
	IsDecode    bool
	Key         string
	Iv          string
	Text        string
	IsUpperCase bool
)

const (
	// MAX_FILE_SIZE 最大文件大小 10 M
	MAX_FILE_SIZE = 1024 * 1024 * 10
)

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
	cobra.CheckErr(rootCmd.Execute())
}

func init() {
	cobra.OnInitialize(initConfig)
}

// initConfig reads in config file and ENV variables if set.
func initConfig() {
}
